cosec inverse solving to the first principle